﻿<Window x:Class="LockCrypt.WinAddGroup"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:lex="http://schemas.root-project.org/xaml/presentation"
    xmlns:l49="clr-namespace:Lime49;assembly=Lime49"
    Title="{lex:LocText LockCrypt.Core:Strings:AddGroup}" ResizeMode="NoResize" Style="{StaticResource {x:Type Window}}" Icon="/LockCrypt;component/Resources/LockCrypt.ico"
    MinHeight="100" MinWidth="300" MaxWidth="200" SizeToContent="WidthAndHeight"
    WindowStartupLocation="CenterOwner" Loaded="Window_Loaded"
    l49:WindowService.EscapeClosesWindow="True">
    <Window.CommandBindings>
        <CommandBinding Command="ApplicationCommands.Save" Executed="Save" />
        <CommandBinding Command="ApplicationCommands.Close" Executed="CloseWindow" />
    </Window.CommandBindings>
    <Grid Margin="6">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>

        <Label Grid.Row="0" Grid.Column="0" Content="{lex:LocText LockCrypt.Core:Strings:Name}"/>
        <TextBox Grid.Row="0" Grid.Column="1" x:Name="txtName" TabIndex="1"/>

        <Label Grid.Row="1" Grid.Column="0" Content="{lex:LocText LockCrypt.Core:Strings:ParentGroup}"/>
        <ComboBox Grid.Row="1" Grid.Column="1" x:Name="cboParent" TabIndex="3" SelectedValuePath="ID" DisplayMemberPath="Name"/>

        <StackPanel Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Right">
            <Button Grid.Column="3" x:Name="btnSave" TabIndex="5" MinWidth="70" IsDefault="True" Command="ApplicationCommands.Save" Content="{lex:LocText LockCrypt.Core:Strings:Save}" />
            <Button Grid.Column="4" x:Name="btnCancel" TabIndex="6" MinWidth="70" IsCancel="True" Command="ApplicationCommands.Close" Content="{lex:LocText LockCrypt.Core:Strings:Cancel}"/>
        </StackPanel>
    </Grid>
</Window>
